{% extends 'common/basic_list.html' %}

{% block list_title %}
    业务
{% endblock %}

{% block list_filter %}
    <div class="col-sm-3">
        <div class="input-group">
            <input type="text" name="name" placeholder="业务名称"
                   value="{{ name }}"
                   class="input-sm form-control">

        </div>
    </div>
    <div class="col-sm-4">
        <div class="input-group">
            &nbsp;
            <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i> 搜索</button>
            &nbsp;
            <a href="project_add/"
               class="btn btn-sm btn-success"><i class="fa fa-plus"></i> 新增</a>
            &nbsp;
            <a href="javascript:void(0)"
               onclick="deleteBatch()"
               class="btn btn-sm btn-danger"><i class="fa fa-trash"></i> 批量删除</a>
        </div>
    </div>
{% endblock %}

{% block list_content %}
    <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
        <thead>
        <tr>
            <th style="width: 2%;"><input id="checkall" type="checkbox" class="i-checks"></th>
            <th style="width: 7%;">前置业务</th>
            <th style="width: 7%;">业务模块</th>
            <th style="width: 5%;">名称</th>
            <th style="width: 5%;">脚本语言</th>
            <th style="width: 5%;">开发负责人</th>
            <th style="width: 5%;">运维负责人</th>
            <th style="width: 7%;">创建时间</th>
            <th style="width:25%;">操作</th>
        </tr>
        </thead>
        <tbody>
        {% for o in result_list %}
            <tr>
                <td>
                    <input type="checkbox" class="i-checks icheck" id="{{ o.id }}" name="input[]">
                </td>
                <td>{{ o.id|preproject_filter }}</td>
                <td>{{ o.project_module|parent_filter }}</td>
                <td>{{ o.name }}</td>
                <td>{{ o.job_script_type|jobscript_filter }}</td>
                <td>{{ o.dev_monitor|parent_filter }}</td>
                <td>{{ o.ops_monitor|parent_filter }}</td>

                <td>{{ o.create_time }}</td>
                <td>
{#                    <a href="{{ o.id }}/project_edit/"#}
{#                       class="btn  btn-sm btn-success"><i class="fa fa-edit"></i>配置</a>#}
                    <a href="project_deploy/?pk={{ o.id }}"
                       class="btn  btn-sm btn-info"><i class="fa fa-edit"></i>部署</a>
                    <a href="project_version/?pk={{ o.id }}"
                       class="btn  btn-sm btn-success"><i class="fa fa-edit"></i>版本</a>
                    <a href="{{ o.id }}/project_edit/"
                       class="btn  btn-sm btn-info"><i class="fa fa-edit"></i>编辑</a>
                    <a href="project_deploy_history/?pk={{ o.id }}"
                       class="btn  btn-sm btn-success"><i class="fa fa-expand"></i>历史</a>
                    <a href="javascript:void(0)"
                       onclick="deleteAction('{{ o.id }}')"
                       class="btn  btn-sm btn-danger"><i class="fa fa-trash"></i>删除</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}